using System;
using System.Collections.Generic;
using System.Linq;

using MvcCms.Data;

namespace MvcCmsProjectTracker.Data
{
    public interface IProjectRepository
    {
        void Save();

        void AddProject(Project project);
        void AddHelpPage(HelpPage helpPage);
        void AddProjectCategory(ProjectCategory category);
        void AddProjectCustomField(ProjectCustomField customField);
        void AddProjectCustomFieldValue(ProjectCustomFieldValue customFieldValue);
        void AddProjectMember(ProjectMember projectMember);
        void AddProjectMilestone(ProjectMilestone milestone);
        void AddProjectPriority(ProjectPriority priority);
        void AddProjectStatus(ProjectStatus status);
        void DeleteProject(Project project);
        void DeleteProjectCategory(ProjectCategory category);
        void DeleteProjectCustomField(ProjectCustomField customField);
        void DeleteProjectCustomFieldValue(ProjectCustomFieldValue customFieldValue);
        void DeleteProjectMember(ProjectMember projectMember);
        void DeleteProjectMilestone(ProjectMilestone milestone);
        void DeleteProjectPriority(ProjectPriority priority);
        void DeleteProjectStatus(ProjectStatus status);

        IQueryable<Project> GetAllProjects(int portalId);
        IQueryable<HelpPage> GetHelpPages(int portalId);
        IQueryable<Project> GetMyProjects(Guid userId);
        IQueryable<Project> GetHelpDeskProjects(int portalId);
        IQueryable<Project> GetNonHelpDeskProjects(int portalId);
        Project GetProject(int projectID);
        IQueryable<ProjectCategory> GetProjectCategories(int projectID);
        ProjectCategory GetProjectCategory(int categoryID);
        ProjectCustomField GetProjectCustomField(int customFieldID);
        IQueryable<ProjectCustomField> GetProjectCustomFields(int projectID);
        ProjectCustomFieldValue GetProjectCustomFieldValue(int customFieldID);
        IQueryable<ProjectCustomFieldValue> GetProjectCustomFieldValues(int projectID);
        ProjectMember GetProjectMember(int projectID, Guid userId);
        ProjectMember GetProjectMember(Guid userId);
        IQueryable<ProjectMember> GetProjectMembers(int projectID);
        ProjectMilestone GetProjectMilestone(int milestoneID);
        IQueryable<ProjectMilestone> GetProjectMilestones(int projectID);
        IQueryable<ProjectPriority> GetProjectPriorities(int projectID);
        ProjectPriority GetProjectPriority(int priorityID);
        ProjectStatus GetProjectStatus(int statusID);
        IQueryable<ProjectStatus> GetProjectStatuses(int projectID);
    }
}